#include <boost/algorithm/string.hpp>
#include <locale>
#include <iostream>

int main()
{
	std::string s = "###David Hilbert###";
	std::cout << s << std::endl;
	std::cout << boost::algorithm::trim_left_copy_if(s,boost::algorithm::is_any_of("#")) << std::endl;
	std::cout << boost::algorithm::trim_right_copy_if(s,boost::algorithm::is_any_of("#")) << std::endl;
	std::cout << boost::algorithm::trim_copy_if(s,boost::algorithm::is_any_of("#"))<< std::endl;

	std::string s1 = "0123456789Leonhard Euler9876543210";
	std::cout << s1 << std::endl;
	std::cout << boost::algorithm::trim_left_copy_if(s1,boost::algorithm::is_digit()) << std::endl;
	std::cout << boost::algorithm::trim_right_copy_if(s1,boost::algorithm::is_digit()) << std::endl;
	std::cout << boost::algorithm::trim_copy_if(s1,boost::algorithm::is_digit())<< std::endl;
}